@import './others.scss';

@mixin inblock-row($children: '*') {
  letter-spacing: -1px;
  @each $child in $children {
    & > #{$child} {
      display: inline-block;
      letter-spacing: 0;
    }
  }
}

@mixin float-row($children: '*') {
  @include clearfix();
  @each $child in $children {
    & > #{$child} {
      float: left;
    }
  }
}

@mixin scroller($dir: '') {
  @if ($dir == y) {
    overflow-x: hidden;
    overflow-y: auto;
  } @else if ($dir == x) {
    overflow-x: auto;
    overflow-y: hidden;
  } @else {
    overflow: auto;
  }
  -webkit-overflow-scrolling: touch;
}
@mixin scroller-x() {
  @include scroller(x);
}
@mixin scroller-y() {
  @include scroller(y);
}

@mixin layout-build() {
  .none {
    display: none;
  }
  .block {
    display: block;
  }
  .inline {
    display: inline;
  }
  .inblock {
    display: inline-block;
  }
  .float-row {
    @include float-row();
  }
  .inblock-row {
    @include inblock-row();
  }
  .scroller {
    @include scroller();
  }
  .scroller-y {
    @include scroller-y();
  }
  .scroller-x {
    @include scroller-x();
  }
}
